package com.gjt.URI_URL;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

/**
 * Created with Intel IDEA.
 * URLDecode 静态类decode对 x-www-form-url-encoded格式编码的字符串进行解码 ，将加号转成空格 %转义字符转换成对应的字符
 *
 * @Auther: gjt
 * @Date: 2024/3/22 21:06
 */
public class URLDecode {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String url ="https://www.google.com/search?&hl=en&as_q=Java&as_epq=I%2FO";
        String decode = URLDecoder.decode(url, "UTF-8");
        System.out.println(decode);
    }
}
